﻿using IQIGame.Onigao.Framework;
using UnityEditor;
using UnityEditor.UI;

namespace IQIGame.Onigao.Game.Editors
{
    [CustomEditor(typeof(ExToggle))]
    [CanEditMultipleObjects]
    public class ExToggleEditor : ToggleEditor
    {
        private SerializedProperty _gobjOn;
        private SerializedProperty _gobjOff;
        protected override void OnEnable()
        {
            base.OnEnable();
            _gobjOn  = serializedObject.FindProperty(nameof(_gobjOn));
            _gobjOff = serializedObject.FindProperty(nameof(_gobjOff));
        }

        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            EditorGUILayout.PropertyField(_gobjOn);
            EditorGUILayout.PropertyField(_gobjOff);
            serializedObject.ApplyModifiedProperties();
        }
    }

}
